package com.beyondsoft.common.activiti.support;

import com.beyondsoft.common.activiti.mapper.WorkflowExtMapper;
import com.beyondsoft.common.activiti.model.CommentData;
import com.beyondsoft.common.activiti.model.HistoryData;
import org.activiti.engine.ProcessEngine;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author zhangyan
 * @version $ Id: QueryHistoricTaskSupport.java, v 0.1 2020/6/22 12:47 zhangyan Exp $
 */
@Component
public class QueryHistoricTaskSupport {

    @Resource
    private WorkflowExtMapper workflowExtMapper;

    @Resource
    private ProcessEngine processEngine;

    public List<CommentData> queryMessageByProcInstId(String procInstId) {
        List<CommentData> commentData = workflowExtMapper.queryMessageByProcInstId(procInstId);
        return commentData;
    }

    /**
     * 查询历史
     *
     * @param procInstId
     * @return
     */
    public List<HistoryData> queryHistoryTaskDefKeyByProcInstId(String procInstId) {
        List<HistoryData> historyData = workflowExtMapper.queryHistoryByProcInstId(procInstId);
        return historyData;
    }

}
